<div class="da-list-wrap">
  <div class="da-content-banner">
    <d-breadcrumb>
      <d-breadcrumb-item><a routerLink="/">{{ 'moulds.breadcrumb.home' | translate }}</a></d-breadcrumb-item>
      <d-breadcrumb-item><a routerLink="/pages/mould/moulds">{{ 'moulds.breadcrumb.mould' | translate }}</a></d-breadcrumb-item>
      <d-breadcrumb-item>{{ 'moulds.breadcrumb.addMould' | translate }}</d-breadcrumb-item>
    </d-breadcrumb>
  </div>
  <div class="da-content-wrapper">

            <div class="card">
              <div class="card-title">
                <p class="form-title">新增模具</p>
              </div>
              <form dForm ngForm [layout]="layoutDirection" [labelSize]="'sm'"[labelAlign]="'end'" class="mt-5" (dSubmit)="submit()">
                <div class="form-body">

                  <div class="grid mt-3">
                    <div class="u-1-2">
                      <d-form-item>
                        <d-form-label>
                          <span class="label"><span class="Required">*</span>编码</span>
                        </d-form-label>
                        <d-form-control>
                          <input dTextInput class="form-input-box" name="code" [(ngModel)]="this.mould.mouldNum" [dValidateRules]="this.FixtureRules.fixtureNum">
                        </d-form-control>
                      </d-form-item>
                    </div>
                    <div class="u-1-2">
                      <d-form-item>
                        <d-form-label>
                          <span class="label"><span class="Required">*</span>名称</span>
                        </d-form-label>
                        <d-form-control>
                          <input dTextInput class="form-input-box" name="name" [(ngModel)]="this.mould.mouldName" [dValidateRules]="this.FixtureRules.fixtureName">
                        </d-form-control>
                      </d-form-item>
                    </div>
                    <div class="u-1-2">
                      <d-form-item>
                        <d-form-label>
                          <span class="label">型号</span>
                        </d-form-label>
                        <d-form-control>
                          <input dTextInput class="form-input-box" name="model" [(ngModel)]="this.mould.model" [dValidateRules]="this.FixtureRules.model">
                        </d-form-control>
                      </d-form-item>
                    </div>
                    <div class="u-1-2">
                      <d-form-item>
                        <d-form-label>
                          <span class="label"><span class="Required">*</span>类别</span>
                        </d-form-label>
                        <d-form-control>
                          <d-cascader
                            [options]="options"
                            [trigger]="'hover'"
                            [showPath]="true"
                            [allowClear]="true"
                            [dropdownWidth]="130"
                            name="deviceClassCode"
                            (ngModelChange)="CascaderonChanges($event)"
                            [(ngModel)]="this.option"
                            [dValidateRules]="this.FixtureRules.fixtureTypeId"
                        ></d-cascader>
                        </d-form-control>
                      </d-form-item>
                    </div>
                    <div class="u-1-2">
                      <d-form-item>
                        <d-form-label>
                          <span class="label">购买时间</span>
                        </d-form-label>
                        <d-form-control>
                          <d-datepicker-pro  [appendToBody]="false"
                          name="purchaseDate"
                          [(ngModel)]="this.mould.purchaseDate"
                          ></d-datepicker-pro>
                        </d-form-control>
                      </d-form-item>
                    </div>
                    <div class="u-1-2">
                      <d-form-item>
                        <d-form-label>
                          <span class="label">工作状态</span>
                        </d-form-label>
                        <d-form-control>
                          <d-radio-group
                            [name]="'status'"
                            [values]="status"
                            [direction]="'row'"
                            [(ngModel)]="chosenItem"
                            (ngModelChange)="statusChange()"
                          ></d-radio-group>
                        </d-form-control>
                      </d-form-item>
                    </div>
                    <div class="u-1-2">
                      <d-form-item>
                        <d-form-label>
                          <span class="label">备注</span>
                        </d-form-label>
                        <d-form-control>
                          <textarea  class="form-input-box" name="model" [(ngModel)]="this.mould.note" ></textarea>
                        </d-form-control>
                      </d-form-item>
                    </div>
                  </div>
                </div>
                <d-form-operation>
                  <d-button bsStyle="primary" dFormSubmit >确定</d-button>
                  <d-button class="ms-3" bsStyle="common" (btnClick)="cancle()">取消</d-button>
                </d-form-operation>
              </form>
            </div>


  </div>
</div>

<d-toast [value]="msgs" [life]="2000" [styleClass]="'custom-class'" [style]="{ left: '50%',top:'10px' }"></d-toast>
